package com.example.springbootxscjxt.mapper;

import com.example.springbootxscjxt.entity.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;


@Mapper
public interface StudentMapper {
@Select("select * from student where name like concat ('%',#{name},'%') limit #{pageNum}, #{pageSize}")
    List<Student> selectxs(String name ,Integer pageNum,Integer pageSize);
@Select("select count(*) from student where name like concat ('%',#{name},'%')")
Integer totalss(String name);
@Insert("Insert into student(studentNo,name,username,password,sex) VALUES (#{studentNo},#{name},#{username},#{password},#{sex})")
Integer add(Student student);
@Select("select * from student")
    List<Student> cx();
@Update("update student set studentNo =#{studentNo} ,name=#{name},username=#{username},password=#{password},sex=#{sex} where id=#{id}")
Integer update(Student student);
@Delete("delete from student where id=#{id}")
    Integer delede(String id);
}
